package com.sample.springbatch.service;

import com.sample.springbatch.model.ActionLog;
import com.sample.springbatch.repository.ActionLogRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author zwg
 * @date 2019-04-20 14:56
 **/
@Service
@Transactional(propagation=Propagation.REQUIRES_NEW)
public class ActionLogServiceImpl implements IActionLogService {

    @Autowired
    private ActionLogRepository actionLogRepository;

   // @Override
    public ActionLog save(ActionLog log) {
        return actionLogRepository.save(log);
    }

   // @Override
    public ActionLog update(ActionLog log) {
        return actionLogRepository.save(log);
    }
}
